# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
# Contributor: Eivind Uggedal <eu@eju.no>
pkgname=spawn-fcgi
pkgver=1.6.5
pkgrel=4
pkgdesc="Spawn FastCGI applications"
url="https://redmine.lighttpd.net/projects/spawn-fcgi/"
arch="all"
license="BSD-3-Clause"
subpackages="$pkgname-doc $pkgname-openrc"
source="https://download.lighttpd.net/spawn-fcgi/releases-${pkgver%.*}.x/spawn-fcgi-$pkgver.tar.xz
	$pkgname.confd
	$pkgname.initd
	"
options="!check"

build() {
	./configure --prefix=/usr
	make
}

package() {
	make DESTDIR="$pkgdir" install

	install -Dm755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -Dm644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="
a6dc2a977953e1092c0b6808b134dfda77869a5c86801d04cfe9e00ee1dcd528d4e2c3adc906f6b6130d6f2cdafd436ba550197701c8b27bbc5a8419e02d269c  spawn-fcgi-1.6.5.tar.xz
44fdc908b868d890713b1eee8f8f5a7ff1a26d0665aa368e76587d479934bbda0a3e4ccd53953fef524103630261c40495cd58963fdea11a47e2cd0f23e1dcf6  spawn-fcgi.confd
c6b44dbdac2ac53d7c26acfa1d433dd81d12fce35e9ba0c7d1341e5da16c6453fdd65de073b22a091b425799b01f08385b3293e33f505d4c26764826e5ab9084  spawn-fcgi.initd
"
